# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicHypertension(models.Model):
    _name = 'basic_hypertension'
    _description = '高血压首诊表'

    healthCheck = fields.Char(string="体检编号", required=True)
    resident_id = fields.Many2one("basic_info", ondelete='set null', string="居民ID", index=True)
    date_of_first_visit = fields.Date(string="首诊日期", default=fields.Date.today())
    constriction = fields.Integer(string="收缩压")
    diastolic = fields.Integer(string="舒张压")
    height = fields.Float(string='身高')
    weight = fields.Float(string='体重')
    waistline = fields.Float(string='腰围')
    smoking_status = fields.Integer(string="吸烟情况-吸烟状况")
    smoking_age = fields.Integer(string="吸烟情况-开始吸烟年龄")
    is_smoking_last_sevn_days = fields.Boolean(string="最近7日是否吸烟")
    is_anti_drugs = fields.Boolean(string="是否服用降压药")
    lifestyle_guid = fields.Char(string="生活方式指导")
    is_ref = fields.Boolean(string="是否转诊")
    ref_date = fields.Date(string="转诊日期", default=fields.Date.today())
    reason_ref = fields.Char(string="转诊原因")
    ref_hosp = fields.Char(string="转诊医院及科室")
    self_ability = fields.Char(string="生活自理能力")
